fullClipboardData
Type
property
Summary
Provides access to the contents of the clipboard.
Syntax
set the fullClipboardData[<key>] to <data>
set the fullClipboardData to empty
Description
Use the fullClipboardData to gain access to the system clipboard. The keys for the fullClipboardData are:
- "text": plain text
- "rtftext": LiveCode rich text format data
- "htmltext": LiveCode HTML text
- "styledtext": array of LiveCode styled text
- "image": any of PNG, GIF or JPEG image. If on Windows, additionally BMP image.
- "png": PNG image
- "gif": GIF image
- "jpeg": JPEG image
- "windows bitmap": BMP image (Windows only)
- "windows metafile": Windows native vector graphics image (Windows only)
- "rtf": Rich Text Format data
- "html": HTML
- "styles": LiveCode styled text data
- "objects": LiveCode objects
- "files": List of newline-separated file paths
- "private": available for in-app use
More keys and data types may be added in the future.
If the contents of the clipboard were placed there by
another app, the clipboard will be automatically cleared
when written to. If you want to do this explicitly, use
set the fullClipboardData to empty
.
The rtftext
, htmltext
, styles
and styledtext
properties are
handled specially by LiveCode: adding any one of them will cause the
rest (plus text
) to be automatically generated and added. You can
query the keys of the fullClipboardData to determine what types of
data are on the clipboard. When setting the text
property
the clipboard (with the exception of private data) is cleared if it
includes any of these properties. This is to allow setting plain text
only.
If you require lower-level access to the clipboard, see the rawClipboardData property.
It is good practice to lock the clipboard before accessing it to prevent data corruption.
Examples
lock the clipboard
put the keys of the fullClipboardData
unlock the clipboard
lock the clipboard
set the fullClipboardData["text"] to "Hello, World!"
set the fullClipboardData["html"] to "<p>Hello, World!</p>"
set the fullClipboardData["private"] to "MyCustomData"
unlock the clipboard
Related
function: clipboard
glossary: clipboard
property: clipboardData, rawClipboardData, fullDragData
command: lock clipboard, unlock clipboard
Compatibility and Support
Introduced
LiveCode 8.0
OS
mac
windows
linux
Platforms
desktop